i=int(input())

if i<=3:
    print(14)
else:
    r=14
    for o in range(i-3):
        r=r+3
    print(r)